/*  Copyright (c) 2009 by Alex Leone <acleone ~AT~ gmail.com>

    This file is part of the Arduino TLC5940 Library.

    The Arduino TLC5940 Library is free software: you can redistribute it
    and/or modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    The Arduino TLC5940 Library is distributed in the hope that it will be
    useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with The Arduino TLC5940 Library.  If not, see
    <http://www.gnu.org/licenses/>. */

#ifndef ARDUINO_LEONARDO_H
#define ARDUINO_LEONARDO_H

/** \file
    SPI and timer pins for the Arduino Mega.  Don't edit these.  All
    changeable pins are defined in tlc_config.h */

#if DATA_TRANSFER_MODE == TLC_BITBANG
#error "If you want bitbang mode, insert pin defs here"
#endif

// MOSI (Leo outter center ICSP pin) -> SIN (TLC pin 26)
#define TLC_MOSI_PIN     2
#define TLC_MOSI_PORT    PORTB
#define TLC_MOSI_DDR     DDRB

// SCK (Leo inner center ICSP pin) -> SCLK (TLC pin 25)
#define TLC_SCK_PIN      1
#define TLC_SCK_PORT     PORTB
#define TLC_SCK_DDR      DDRB

// SS (Leo RX LED)
#define TLC_SS_PIN       0
#define TLC_SS_DDR       DDRB

// OC1A (Leo pin 9) -> XLAT (TLC pin 24)
#define XLAT_PIN         5
#define XLAT_PORT        PORTB
#define XLAT_DDR         DDRB

// OC1B (Leo pin 10) -> BLANK (TLC pin 23)
#define BLANK_PIN        6
#define BLANK_PORT       PORTB
#define BLANK_DDR        DDRB

// OC3A (Leo pin 5) -> GSCLK (TLC pin 18)
#define GSCLK_PIN        6
#define GSCLK_PORT       PORTC
#define GSCLK_DDR        DDRC
#define TLC_TIMER3_GSCLK 1
#endif // ARDUINO_LEONARDO_H

